//
//  PushManager.h
//  OnepushNotification
//
//  Created by GJS on 2019/3/11.
//  Copyright © 2019 GJS. All rights reserved.
//

#import <Foundation/Foundation.h>
#if __has_include(<React/RCTBridgeModule.h>)
#import <React/RCTBridgeModule.h>
#import <React/RCTBridge.h>
#import <React/RCTConvert.h>
#import <React/RCTEventEmitter.h>
#else
#import "RCTBridgeModule.h"
#import "RCTBridge.h"
#import "RCTConvert.h"
#import "RCTEventEmitter.h"
#endif
#import "JPushManager.h"
#import "BadgeNumberManager.h"

static NSString *const PUSH_TOKEN = @"PUSH_TOKEN";
static NSString *const RECEIVE_NOTIFICATION = @"RECEIVE_NOTIFICATION";
static NSString *const RECEIVE_NOTIFICATION_CLICK = @"RECEIVE_NOTIFICATION_CLICK";
static NSString *const RECEIVE_MESSAGE = @"RECEIVE_MESSAGE";
static NSString *const RECEIVE_VOIP = @"RECEIVE_VOIP";

NS_ASSUME_NONNULL_BEGIN

@interface PushManager : RCTEventEmitter

@property (nonatomic, copy) NSDictionary *launchOptions;

+ (instancetype)sharedManager;

+ (void)didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings;
+ (void)didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
//收到远程推送消息
+ (void)didReceiveRemoteNotification:(NSDictionary *)notification;
//收到本地推送消息
+ (void)didReceiveLocalNotification:(UILocalNotification *)notification;
//用户点击消息回送事件
//+ (void)didReceiveNotificationResponse:(NSDictionary *)notification;

/**
 * 注册远程推送
 */
+ (void)registerPush;
/**
 * 注销远程推送
 */
+ (void)unregisterPush;
/**
 * 从通知启动App，临时存储的数据
 */
+ (void)getCacheMessage;
+ (void)areNotificationsEnabled:(void (^)(BOOL))callback;
// 如果用户关闭了接收通知功能，该方法可以跳转到APP设置页面进行修改
+ (void)startNotificationSettings;

@end

NS_ASSUME_NONNULL_END
